package top.ahzy.seobench.model.entity;

import com.alibaba.fastjson2.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 消息表
 * </p>
 *
 * @author ahzy
 * @since 2024-11-22 15:21:29
 */
@Data
@Accessors(chain = true)
@TableName("seo_message")
@ApiModel(value = "Message对象", description = "系统消息表")
public class Message implements Serializable {

    @ApiModelProperty("主键")
    @TableId("id")
    private String id;

    @ApiModelProperty("用户id")
    @TableField("user_id")
    private String userId;

    @ApiModelProperty("内容")
    @TableId("content")
    private String content;

    @ApiModelProperty("创建时间")
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") 	// 页面写入数据库时格式化
    @JSONField(format="yyyy-MM-dd HH:mm:ss")	    // 数据库导出页面时json格式化
    @TableField("create_time")
    private Date createTime;


}
